import Foundation

// MARK: - Bottom Navigation Item Model
struct BottomNavigationItem: Codable, Identifiable {
    let id: Int
    let name: String
    let link: String
    let unchecked: String  // 未选中状态的图片URL
    let checked: String    // 选中状态的图片URL
    
    // 计算属性，提供更友好的属性名
    var title: String {
        return name
    }
    
    var uncheckedImageURL: String {
        return unchecked
    }
    
    var checkedImageURL: String {
        return checked
    }
    
    var linkURL: String {
        return link
    }
}

// MARK: - Bottom Navigation Response Model
struct BottomNavigationResponse: Codable {
    let bottomNavigationList: [BottomNavigationItem]
    let isCustom: String  // 改为String类型，因为API返回的是字符串
    
    // 计算属性，提供更友好的属性名
    var navigationItems: [BottomNavigationItem] {
        return bottomNavigationList
    }
    
    var isCustomNavigation: Bool {
        return isCustom == "1"  // 字符串比较
    }
}